import { createI18n } from 'vue-i18n';
import enMessages from './lang/en.json';
import zhMessages from './lang/zh.json';

const lang = localStorage.getItem('lang')

const i18n = createI18n({
    locale: lang || 'zh',
    legacy: false,
    globalInjection: true,
    messages: {
        en: enMessages,
        zh: zhMessages,
    },
});

export default i18n;
